added controller and display functions