eliminate all compiling errors. still lots of warnings