eliminated most of the warnings