added edward's code as reference