remove callbacks and use yield