still working on merging functions