seperated functions into .sh-files because of forking problems