Virtual field support.

Hi, I have made a simple modification to support virtual fields.