Working model - full algo + db conn + rendering