fixed some deprecated functions