added functions for data_schedule.cpp