added a final code example