widget prototype works, should be moved to .js file