modified to use collection view