implement get and put commands