Fiddled with types to help Janaka's functions.