improved tracking helper code slightly
added rotation testing part