reworked -p option