prepare to handle callbacks