extract even more common view code