Added basic crop function
Further work on crop function