fixes map resize issue
adds pagination logic