Auto orientation is added

Hi,

I created an auto orientation method :)
Hopefully you will find it useful