Re-wrote the client side