fixed fail refactor