remove unnecessary bits