add files from Mihai
fix merge conflicts, brutally