add core functionality for command