added reading
added count_of_null function
added execution fuction
fixed bugs
removed global variables, added static variables in reading function
removed unused function
some changes in using malloc function