fixed anonymous function invocation of iife on line 29
simple implementation of MainController using