improved current_scope