Adding table functionality