Added code for 3rd semester