factored out dependency