some little changes in code