solve it by simple math. can be better if analysis more