Update with constructor

This addresses deprecation warnings