correct declaration of types and functions