added boundry conditions