implemented boundary classifier