make code consistent with rest of file
simplify example