finished edition with some bugs unfixed