Better implementation?