opimized and finished the dice