refactored data parsing to an eval statement