printing paramter p in console (bug resolved)