Only compile function just before running it