updated test
fixed potential bug in bitwriter (but havent started testing bitwriter yet)