remove redundant code from interview