added fps counter and serial buffering