looks like it actually is working and i forgot to add the bswap16 function (probably...