add frame_rate.cpp
cleaned code
update helper functions
update main