implemented better delegation flow