move oneTime detection to parser and cache function values