remove the redundant code