improvement to simple example