fixing deprecated stuff
fixing warnings