completed pagination and working and crud in a way to use same form for both operation