second commit:fixed bugs