move type definition into separate file