Explaination of code used in project