split logic in many files fix #68