finished with comments added