refactor to use command + parameter