Refactoring and add function to return Query Result as List<Result>