final model, many last minute hacks