Refactored problems 56 & 59