fixed logical error at y/n fxn