added boundary treatment -> causes runtime error