getting rid of unnecessarily deep calls in callbacks