add mods suggested by morteza and andrea