Incorporating changes suggested by Noam Postavsky