controller altered
edit and delete and pagination added