example7 not working as it should