replace deprecated method with suggested one

@joe-goullaud @ndonald2 If one of you has a few minutes, should we merge this into master? Also see #4 it's been hanging out for a while.