first commit, porting dorimanx work