removed main and other unused code from dice