fixed all teh bugs