deleted some functions.
Added a test function.