current version, issues around line 51 in main_controller