remove dupicate code