write, reads and take from items in database