removed function duplication