moved methods to util class for imgManipulations