melt functions to combine data and parameters