use view instead of greedyView
various improvements