remove lots of warnings from the code