messy answer to problem 7
add ruby std lib implementation of 007