remove possible duplicate code