implemented rotation (seems to work, still testing)
converted everything to double
fixed the discontinuity bug in the rotater, seems to function now ...