changed code so that we only focus on server-side first