Updated timecard generating code