added return value in get_data