functioning buttons + uploading to server