try out alt method to avoid deprecation warnings