alpha version of general purpose processing function