passing server data to js