refactoring. renaming and get lists from db