Fixing my homework