pan function designed