last commit for fixing issuse #6 still have bug, this may really fix :)