debugged and sometimes working fingertip + corrected main.cpp