adding auto redirect