moved types to Types.hs