removed ambiguity in library by moving to a seperte function merge