fixed stupid pass by value