convert java crap into proper collections