successfully modularized the rotation calibration code
furthur improved rotation calibration code