added fn and getTime