more speed and bug fixing