added utility function