finish function definition, add toy graph