compile function update