Adding function create_field

Signed-off-by: Elliot Condon <e@elliotcondon.com>