Implemented first version of the scaleCrop method