added command parsing functionality