moved delrecation warning inside brackets