added kabsch test, fixed bug