created some logic for rotating and positioning visualizations