fixed pagination, without mongoose module