add dedent function

closes #46