implement methods to work with result sets. Closes #2
updated tests