added datatype parameter so the client knows what to display