Working version, no more eval. Extracted and inlined!