added fixed bugs