adding better javascript syntax