added some methods for controller and moved and renamed packages