__extend helper in closure scope