finish fundamental features of server;update app code