changed javascript init