updated styles and error handeling