very complicated implement problem, solve it very good though not elegant, goood