fixing my broken code