brought in previous commit versions, code untested, still need to clear up
modified makefile to compile new supplementary code files and created test files for them