updated iteration three