updating comments and debugging