Hopefully I've uploaded the circuit properly

Attachment 21291

Using an apostrophe to denote the over-bar (Not), "+" is or, and "." is and, I wrote the initial circuit as:

r = (p'.(p.q).q)'

which I then simplified as follows:

r = p'' + (p.q)' + q'

= p + p' + q + q'

= 1

However, I'm not convinced this is correct. Help please.