moved type definition to seperate file