adding printToDiv function to addget server side