Console log

cleared undefined error, will test for p, r and n