removing unnecessary flag check