first debugged version finished