this is done on rapture branch will port changes to master one of these days.