refactor db design, 80% done