added foreach example