working on fixes to have it work with minified