refinements to simplify and also apply this to other context