#3 fixed bugs