resolved #7 and resolved #8