assigning fields to layout