added in new features, fixed bugs