working on the Query method in TransactionManager