reformed code in client page