replaced inline javascript