fixed command, added tests