removed a test function and some debugging code