begin adding encoder idea, might need to recode all