Added boundry conditions.