plugin files refactored
added calling js callback