modified utils and updated test accoridngly