added response checking
implemented test method
changed main test method