potential bugfix and adding centering and rotation