ruby graph stuff