main app script