Reformatted
Add return types to view def to enforce correctness