implemented view restriction and in the middle of update,destroy restrictions