Replaces deprecated functions