Got magicNum constant wrong due to byte ordering. Need to debug to past test cases