working on table view not yet working but average is