change to support byte alignment