refactored, added main screen