reduce unnecessary codes