finished first version. some stuff is missing