implemented basic controller structure