solved ID31, needs some cleaning