takes a while but it works
merging