tying data to view