started implementing time function