merge method works but is very slow