tried to remove most of the warnings