remove unnecessary error check