changed code example for greater clarity