add edward's code