Added function for option -p