p_y wasnt being cached correctly