updated with less printing