using the callback function functionality