working on insitu
experimental version works