Implementing the "-p" flag