Changed the style and improved performance