so many changes.. and adapted for KK. may not compile fully yet!