removing redundant testing code bits