test to show scala closures