load scripts properly