Changed functions to use server data