updating the broken code