merge author's code