added comment and reordered methods