sample solution from a demo i put together on DI