ssf merge

added and tested merge function