moved js init code into tag