added sprite scaling and rotation