add loc fdr: clean up code & doc