bigger time interval #291
query refactor #291