update utilities, add tests