added packets, add db functions