fixed put back a function that was removed as part of last refactor.