now checks for user's algorithm choice