added Json Data; more refactoring