fixing unnecessary object creation