<DE2> added functions and test functions for database