removw dublicate code