moved function call to scripts