adding the new routines I forgot in the last 3 commits...