generate and compile