make hoist work recursively