change tendency rate and remove unused code