implemented -p option