generic version of source prototype