#109 some rework based on @omaciel review.thanks much.