added minor features. bug fixes