updated version and fixed bugs