debugged test functions