Change mapping from 8 bit to 10 bit
added message handeling