console log not calculating properly. debugging