half-assed implementation of dice