python solution works
completed ruby solution