fixed for multiple tables