remove unused duplicate code