Deleted repeated code