findishing off export refactor to use server