functions and global vars now inside VCR