fix query
refactor files