Added timespan on each query and fixed java project