finished editing functions and writing test scripts -- all work