changed functions so they actually work