switched to 'inheritance' with closures