changed the way options and pagination are handled again.