Modified returns to avoid potential heap allocation