cleanup deadcode code