make code pass js hint