fixed my broken code