remove unncessary anonymous function