remove depreciation wranings
got rid of some depreciation warnings