tested against browser and fixed errors