fixed notices and formatting