more generics and removed j2me code