clunky, but it works
cleanup