refactor and doc notes
this might work with 2.6