Add main functionality