fixed test function in UI