renamed callback to main