improving calling and creating a pipeline