added p1
added exceptions interface