Began working on getCommand function