Code for the project assignment