get_data and related functions implementation