Convert to function

Signed-off-by: Sean V Kelley <seanvk@ortracks.org>