added name slot to function