fixed the errors, but code still doesn't work :(