add types and compile warnings