We should keep returning raw data in this method AND encode it in template instead