updated some errors and added some tests for ios8