Add a helper function and enhance readibility.