added decorator and split run to make it more manageable