let javascript do the work