okay really works now (and cleaned up)