added testing algorithm to backend