ectracted method, added test