fixed with better impl