imporved unittest