change the way the functions are called for real time update
add file to store functions needed for real time update