remove redundant code snippet