Algorithm enhanced