finished changes as well as the broken code