function overriding using closures
working example