refactoring. Created AbstractResults
refactored table access