remove unnecessary attributes