please add documentation and maybe even a test in the function which raises an exception if the value is none of ('slice', 'project')