adding basic functionality into the controller