Start to refact query
refactoring query