created methods for index,show,destroy