updated comments and constants as proposed in review