alternate version/cleanup, doesn't work any better yet