add structure selection function
merge