dealt with unittest issues