switch order to not use deprecated method