function rewrite
removed no longer needed functions and their unit tests