changed currentTime to getTime