replaced the date hack with Date.now()