Using function instead of multiple die calls