new callback paradigm to fit it into the general render loop