from what ive done in which a function is used as a callback