refactored model @macasaurus + @vincentstorme