Added valid code to the kingdom class.