move all main logic to manager class