changed to compile when needed