updated comments, formatting