renamed and fixed some errors