added one query to user so that now logic is finalized