updated and refactored code, up in chrome store