refactor to adapter view's use