Add compile function.