updated w.r.t. TRevor's comments