moved types into separate files