a lot of work on #137 but not done yet