added auto orient