deleted repeated code on doc load