use interfaces instead of structs