update before_action + removing deprecated code