Added comments for better understanding few of the methods