added keep-each option