cleaned up main file