added solution
old version