adds solution for 7th problem