work with DB moved to main method