added border prebasis code