create nsmash function.