fixed up boundary method