js for combining populations...work in progress..