added class to get columns from table
refactored api
refactored api