converted pat and app to dictionary