this makes most of it work