morph separated and merged to one function