client-side logic added