added comments in logic methods