parsing and selecting function move to server.