tableview working, needs to be tidied up'