add types and functions (issue 27)