duplicate code have been removed