started trying to merge by parser with Mikael's code