sort out paths