added some controllers and functions