removed console.logs and moved creation of <p>