finishing up javascript