added mapCommand, unmapCommand APIs