make init code more re-usable, added a get_data and a callback