beginning implementing time function