solve functions
solve functions and merge