The code behind LastGraph