New methods. Query funcionality added