added comments for confusing methods