implementing the main app