finished jiang implementation