finished user functions. all tests passing. fixes #6.