updated front-end to use server-side order calculation