add seperate functions calculating output values