part of the implementation of 3b
merge done