fixed bugs, added fields