my attemps at learning what is happening here