add parseTenor as a separate function