Added some code for die selection