command_in_slice moved to tools.py