get_data: oops. fixed some bugs