moved script to header