fitting serious bug on period estimate. not finished