Added styles and make it functional automatically