refactoring
query 3 debugging