Added customized messages and containskey