proper commit of 1-5, also did 6 in a simple way