move script to footer
make sure expected array is array