refactored test added