added comments for each method