adding table functionality