add types, tests