delete repeated code