added Sage solution and output