added mapcrop function