added cache
bug fixs