renamed stuff and added some comments