format numbers and implement getTime