updated methods and added comments
updated methods and added comments