Function quadruples implementation