fixed some bugs
add rewritten code for getTimeTableElements