reading validation added AND major refactoring performed