added basic functionality for chrome extension.