added functions for lrcdfs