refactored our class

refactored to pass in the table as an argument

Signed-off-by: Paul Stone <pmstone247@gmail.com>