Complete command_split method and grid method