added pagination for factories index