Code and comments added