write first version finished