added implementetion for startOS and some refactoring