adapt examples 05 and 06