moved a require to proper location