remove dublicate code as well as gutted old file