Added compile function