function and updated styles