minor performance improvements by setting entire translation instead of x and y independently