simplify UDA, add complex unit test