added boundary class and implementation