first draft implementation of merge button and function...