program for solving different tests