Create realtime functions

#335