populate fields with data for functions