add duration to query
delete trailing space