updated append bias to handle both column and row vectors