adds a algorithm for redirecting different types of users