added a bit of query