a few small changes, but still doesn't work