added virtual fields and fixed issue related to bits
refactored get_field_details