refactor of entity view for all types