In a triangle ABC, D is the midpoint of AB and E is a point on BC such that BE=#2/3# BC. If AD=p and AC=q, express EC in terms of p and q.