add test command and remove dead code