added dynamic views and main controller