removed old function and updated style