Separate exdent function from position calculation