Add solutions to #14 and #16