Added serial communication but still some bugs