refactored model tables