solve problem 23
add problem 24, 26 not done yet