crappy version now working