made image invariant to rotation...and couple of changes