fixed #8
fixed #6
fixed #7