conditional Append to dictionary if condition match