merge all functions