add solution, update formatting and testing of answer.