added check function so won't be needed to check if the process is running