removed about 200 warnings from the code