fixes _almost_ all warnings