function works, added more info, but the final alert won't console log