cleaned up main and added TODO