Introduce private_data, modified each function to work with it