added simple rotation invariance