fixed all bugs