more comments, added modularity