fixed #4 & fixed #5 & fixed #6 & fixed #7