Took out repeated code