added more extensive shaking + cleaned up some code
merged