added reading possibility + some code refactoring