minor mods + make it work