adding warn logic