reworked test handling