First attempt at production code