moved commands into a js object