main first version finished