use byteorder.h instead of implementing another byte swap function