more proper javascript syntax