moving core to local
bug fixes
bug