moved parsing to separate class