added code to get commands, but need to fix this