appropriate algorithm for application