function to check process ID
function to kill a process by name