some refactor, and added created at and updated at to every table