added some changes and fixed some stuff