Query methods occurred before and occurred after are working