fix unused and deprecated functions