switch away from deprecated functions