added some new chunks of code