Use newer APIs whenever possible