added multicode support