cleanup path generation