renamed form to function