rubcop fix deprication warnings