fitting serious bug on period estimate. fix angle bug