this is a mess, but things work. checkpoint
cleanup