added tests for all the functions
fixes to ld and now completes core tests
updates to make unit testing work