repeated code removed