full pipeline (to be debugged)