constructor is modified for showing custom fields.