cleaned up the code example