pagination support added to controllers and tests