messing up query.java