messy broken intercommit
starting to restore functionality, but now only compatible with new API