Added code for the first part