converting to dictionary