better havlak code