cleaned up code, to parse through list view