with the help of previous q108
sol of q109