first dice implementation