optimize functionalities between client and server