Fix bugs and and encoing identify