put parsing code in model