Better Height Check Code