updated for new -a option