implemented features and tests