fixed #3, #6