use better border code