A helper function would help here.