final mods by Edwin