implemented the backend for dice rolls.