make utility function some for flexible