Code passes unittest