copied over the java solutions
beginning work on future posts