created a rotate image method (so far unsuccessful)