adds a function that uses delegate to delegate its function to an object