added conditionals and a Die class