added host byte order detact function