fixed #10 and begin #8