Sending and receiving database finally implemented