added features and tests