read pid as paramter argument