making function