added three tables and also added custom functionality