converted to object orientated. Added check for valid set time value. some functions get their variables from private values now