PUT functionality almost finished