updated comments and made change to overall design