updated tests
database & basic structure
refactored