refactor user queries, model