fixed all the bugs!