changed p to span, removed extra script tag and added end script tag