added problem 17
fixed some stuff