models logic