adding writing-reading from db classes