reverted some commits
finally fixed all errors