moved and refactored classes