made improvements to Utils.java for put #14