bug fixes for fit()
some fixes
added anneal based layout
added counter