replaced new Date.getTime with Date.now()