added multiple param functionality, command validity check