AFP skeleton code