tdd commit for bug #177

See #177
datalog: tdd test for bug #107

See #107